Skip to contentSkip to conversation

SDK magic file issue

DISCUSSION Tom Hochstein 2 participants 2 messages May 27, 2025 – May 30, 2025

lore
Share & tools
lore
#0 lore raw

Hi All,

We're having an issue doing an SDK build based on Walnascar. The log is filled with thousands of magic file warnings like the following:

```
Building libteec.so
  CC      src/tee_client_api.c
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 1: Warning: offset `�' invalid
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 2: Warning: offset `Version=' invalid
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 3: Warning: offset `http://www.difstream.com' invalid
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 7: Warning: offset `' invalid
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 8: Warning: offset `Firmware v' invalid
    %<--- S N I P ---%<
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 4765: Warning: offset `' invalid
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 4766: Warning: offset `' invalid
file: File 5.45 supports only version 18 magic files. `/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc' is version 19 (No such file or directory)
```

This seems to show the root of the problem is the build is using the file program 5.45 from the build machine, which does not match the 5.46 magic file specified by the SDK. Indeed, we've worked around the problem by downgrading the file recipe to 5.45.

So, why is the build using the file program from the build machine? I tested the basics and can see that sourcing the SDK setup script does make the SDK file program the selected one.

This is not easy to debug since I don't know where the file command invocation comes from. Perhaps 'strace' will help?

I'm hoping someone might have an idea to help narrow this down. Thanks in advance.

Tom

#1 lore raw
Quoted 28 lines · Tom Hochstein via lists.openembedded.org

Hi All,

We're having an issue doing an SDK build based on Walnascar. The log is filled with thousands of magic file warnings like the following:

```
Building libteec.so
  CC      src/tee_client_api.c
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 1: Warning: offset `�' invalid
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 2: Warning: offset `Version=' invalid
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 3: Warning: offset `http://www.difstream.com' invalid
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 7: Warning: offset `' invalid
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 8: Warning: offset `Firmware v' invalid
    %<--- S N I P ---%<
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 4765: Warning: offset `' invalid
/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc, 4766: Warning: offset `' invalid
file: File 5.45 supports only version 18 magic files. `/opt/fsl-imx-internal-xwayland/6.12-walnascar/sysroots/x86_64-pokysdk-linux/usr/share/misc/magic.mgc' is version 19 (No such file or directory)
```

This seems to show the root of the problem is the build is using the file program 5.45 from the build machine, which does not match the 5.46 magic file specified by the SDK. Indeed, we've worked around the problem by downgrading the file recipe to 5.45.

So, why is the build using the file program from the build machine? I tested the basics and can see that sourcing the SDK setup script does make the SDK file program the selected one.

Quoted 5 lines

This is not easy to debug since I don't know where the file command invocation comes from. Perhaps 'strace' will help?

I'm hoping someone might have an idea to help narrow this down. Thanks in advance.

Not off-hand.

Could you explain exactly how to reproduce the issue and maybe create a YP Bugzilla defect?

../Randy

Quoted 12 lines

Tom

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#217318):https://lists.openembedded.org/g/openembedded-core/message/217318 Mute This Topic:https://lists.openembedded.org/mt/113329951/3616765
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
# Randy MacLeod
# Wind River Linux